package com.filldream.fastboot.core.manager;

import com.filldream.fastboot.base.entity.FreightModel;
import com.filldream.fastboot.base.mapper.FreightModelMapper;
import com.filldream.fastboot.common.entity.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author RickSun && iFillDream
 * @version 1.0
 * @data 2020-05-27 9:30
 * @description 运费模板Manager
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class FreightModelManager {

    @Autowired
    private FreightModelMapper freightModelMapper;

    //添加运费模板
    public R<FreightModel> add(FreightModel freightModel){
        Integer insert = freightModelMapper.insert(freightModel);
        return insert >0 ? R.successd(freightModel): R.fail();
    }


}
